import request from '@/utils/request'

// 查询API凭证管理列表
export function listCredentials(query) {
  return request({
    url: 'api/credentials/list',
    method: 'get',
    params: query
  })
}

// 查询API凭证管理详细
export function getCredentials(id) {
  return request({
    url: 'api/credentials/' + id,
    method: 'get'
  })
}

// 新增API凭证管理
export function addCredentials(data) {
  return request({
    url: 'api/credentials',
    method: 'post',
    data: data
  })
}

// 修改API凭证管理
export function updateCredentials(data) {
  return request({
    url: 'api/credentials',
    method: 'put',
    data: data
  })
}

// 删除API凭证管理
export function delCredentials(id) {
  return request({
    url: 'api/credentials/' + id,
    method: 'delete'
  })
}
